#ifndef __ZUISLIDER_H__
#define __ZUISLIDER_H__

#include "ZProgress.h"

namespace ZuiLib
{


class ZSlider:public ZProgress
{
public:
	ZUI_CLASS_NAME("zui.Slider");
	ZSlider(void);
	~ZSlider(void);

	const char* GetClass() const ZOVERRIDE;
	uint32_t GetControlFlags() const ZOVERRIDE;
	void* GetInterface(const char* pstrName) ZOVERRIDE;

	void SetEnabled(bool bEnable = true) ZOVERRIDE;

	int GetChangeStep();
	void SetChangeStep(int step);
	void SetThumbSize(SIZE szXY);
	RECT GetThumbRect() const;
	const char* GetThumbImage() const;
	void SetThumbImage(const char* pStrImage);
	const char* GetThumbHotImage() const;
	void SetThumbHotImage(const char* pStrImage);
	const char* GetThumbPushedImage() const;
	void SetThumbPushedImage(const char* pStrImage);

	void DoEvent(TEventUI& event) ZOVERRIDE;
	void SetAttribute(const char* pstrName, const char* pstrValue) ZOVERRIDE;
	void PaintStatusImage(ZRenderer* render) ZOVERRIDE;
//signal:
	sigslot::signal2<ZSlider*,int> SignalValueChange;
protected:
	SIZE m_szThumb;
	uint32_t m_uButtonState;
	int m_nStep;

	ZImageDrawInfo m_sThumbImage;
	ZImageDrawInfo m_sThumbHotImage;
	ZImageDrawInfo m_sThumbPushedImage;
};



}

#endif